home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / snpd1292.zip / XFILE.H < prev    next >
C/C++ Source or Header  |  1992-12-26  |  748b  |  42 lines

  1. /*
  2. **  xfile.h -- definitions for fast line buffered files
  3. */
  4.  
  5. #ifndef __XFILE_H__
  6. #define __XFILE_H__
  7.  
  8. struct _xfile {
  9.     int   fd;
  10.     int   bufSize;
  11.     char *buf;
  12.     char *nextChar;
  13.     char *lastChar;
  14. };
  15.  
  16. typedef struct _xfile XFILE;
  17.  
  18. #include <dos.h>
  19.  
  20. #if defined(__ZTC__)
  21.  #include <io.h>
  22.  #define DOS_OPEN dos_open
  23.  #define READ     read
  24.  #define CLOSE    close
  25. #elif defined(__TURBOC__)
  26.  #include <io.h>
  27.  #include <fcntl.h>
  28.  #define DOS_OPEN _open
  29.  #define READ     _read
  30.  #define CLOSE    _close
  31. #else /* MSC */
  32.  #include <stdlib.h>
  33.  #include <fcntl.h>
  34.  #define CLOSE    _dos_close
  35. #endif
  36.  
  37. XFILE *xopen(char const *);
  38. void   xclose(XFILE *);
  39. char  *xgetline(XFILE *);
  40.  
  41. #endif  /* __XFILE_H__ */
  42.